//
//  LDUserCacheManger.swift
//  DingDongZP
//
//  Created by 三秒文化 on 16/5/30.
//  Copyright © 2016年 iyhjiang.com. All rights reserved.
//

import UIKit
import SDWebImage

class LDUserCacheManger: NSObject {
    
    
    var ImgManger = SDWebImageManager.sharedManager().imageCache
    
    func removeAllCache(complete:(()->Void)?) {
        
        let imgManger = SDWebImageManager.sharedManager()
        imgManger.imageCache.cleanDisk()
        let manger = LDUserInfo.sharedInstance.userCacheManger
        manger?.removeAllObjects()
        
        if complete != nil {
            complete!()
        }
    }
    
    
    func cacheImage(key:String) {
//        ImgManger.cachePathForKey(<#T##key: String!##String!#>, inPath: <#T##String!#>)
    }
    
    class var userCacheManger: LDUserCacheManger {
        
        struct Instance {
            static let instace = LDUserCacheManger()
        }
        return Instance.instace
    }
    
    private
    override init() {
        super.init()
    }
}
